
<div class="index">
	<h2>
	<?php __('Assinantes');?>
	</h2>
	<div class="info_table">
		<?php
	echo $this->Paginator->counter(array(
	'format' => __('Existem %count% assinantes cadastrados atualmente!', true)
	));
	?>
	</div>
	<table cellpadding="0" cellspacing="0" class=grande>
		<tr>
			<th><?php echo $this->Paginator->sort("Nome", 'nome');?></th>
			<th><?php echo $this->Paginator->sort("E-mail", 'email');?></th>
			<th width="50px"><?php echo $this->Paginator->sort("Ativo", 'ativo');?></th>
			<th width="100px"><?php echo $this->Paginator->sort("Data de Assinatura", 'date_assinatura');?></th>
			<th width="30px"></th>
		</tr>
		<?php
		$i = 0;
		foreach ($assinantes as $item):
		$class = null;
		if ($i++ % 2 == 0) {
			$class = ' class="odd"';
		}
		?>
		<tr <?php echo $class;?>>
			<td><?php echo $item['Assinante']['nome']; ?>&nbsp;</td>
			<td><?php echo $item['Assinante']['email']; ?>&nbsp;</td>
			<?php if($item['Assinante']['ativo']){?>
				<td>Sim&nbsp;</td>
			<?php }else{?>
				<td>Não&nbsp;</td>
			<?php } ?>
			<td><?php echo $item['Assinante']['date_assinatura_view']; ?>&nbsp;</td>
			<td>
				<?php echo $this->Html->link(
					$this->Html->image('trash.png', array('alt' => 'Apagar', 'title' => 'Apagar'), true),
					array('action' => 'delete', $item['Assinante']['id_assinantes']),
					array('escape' => false),
					sprintf(__('Tem certeza que deseja apagar %s?', true), $item['Assinante']['email'])); ?>
			</td>
		</tr>
		<?php endforeach; ?>
	</table>
	<p>
	</p>

	<?php if ($this->Paginator->numbers()){?>
	<div class="paginacao">
	<?php echo $this->Paginator->prev('<< ' . __('Anterior', true), array(), null, array('class'=>'disabled'));?>
		|
		<?php echo $this->Paginator->numbers();?>
		|
		<?php echo $this->Paginator->next(__('Próximo', true) . ' >>', array(), null, array('class' => 'disabled'));?>
	</div>
	<?php } ?>
</div>